home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17259 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.4 KB

  1. Path: newsfeed.concentric.net!news
  2. From: "Alan L. Lovejoy" <alovejoy@concentric.net>
  3. Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk
  4. Subject: Re: Will Java kill C++?
  5. Date: Sun, 14 Apr 1996 14:53:53 -0700
  6. Organization: Modulation
  7. Message-ID: <317173F1.5790@concentric.net>
  8. References: <3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net> <4kqjf6$kh0@kaiwan009.kaiwan.com>
  9. NNTP-Posting-Host: cnc009041.concentric.net
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.01Gold (Win95; U)
  14.  
  15. Mike Zorn wrote:
  16. > In <4kbfn8$1bu@news1.is.net> mvantassel@teambca.com (Mark VanTassel) writes:
  17. > >"Alan L. Lovejoy" <alovejoy@concentric.net> wrote:
  18. > >>Bzzzt!  Not according to the benchmarks I've done.  Go benchmark the factorial or fibonacci
  19. > >>functions (implemented recursively) in both C and a good Smalltalk.  You are in for a big
  20. > >>surprise.
  21.  
  22. > >I don't think this is a valid benchmark... (and I too fail to see how
  23. > >Smalltalk can be faster than C++ except perhaps in bizarre special
  24. > >cases)
  25. >    True, the Fibonacci and factorial are not good candidates for a
  26. > recursive algorithm.  (They're just taught that way because it's one
  27. > of the few recursive problems that we can understand in first-year
  28. > college courses.)
  29. >    On the other hand, almost any interesting program, compiled & run
  30. > in different languages, should be able to give a good idea of how the
  31. > languages compare.  For my part, I'd also like to look at the source
  32. > code, and know how long it took to write (and debug) the two programs.
  33. >    So, Alan, I guess you'll have to come up with a program for
  34. > Ackermann's Function in C++ and Smalltalk to satisfy the rest of us.
  35. > Mike Zorn      ozma@kaiwan.com   |  Thought for the day:
  36. >   http://www.kaiwan.com/~ozma/   |    Java is C--
  37.  
  38. I did those benchmars to prove that Smalltalk message sends are faster
  39. than c function calls.  To do that, I needed a benchmark that consisted
  40. mostly of function calls/message sends--and involved as little other
  41. code as possible.  The recursive factorial and fibonacci functions
  42. meet those requirements better than anything else I could think of.
  43.  
  44. To do any better, you'd need a completely synthetic benchmark.
  45.  
  46. --alan
  47.